from tkinter import *

root = Tk()
Button(root, text="退出", command=root.quit).pack(side=LEFT)
root.mainloop()
